//
//  LLConditionalView.h
//  TaoTuo
//
//  Created by admin on 2019/8/20.
//  Copyright © 2019 admin. All rights reserved.
//

#import <UIKit/UIKit.h>
@class LLConditionalView;

@protocol LLConditionalViewDelegate <NSObject>


/**
 点击回调

 @param conditionalView self
 @param title 选择的标题
 @param isAsc 是否升序
 */
- (void)conditionalView:(LLConditionalView *_Nullable)conditionalView title:(NSString *)title isAsc:(BOOL)isAsc;

@end

NS_ASSUME_NONNULL_BEGIN

@interface LLConditionalView : UIView

///共多少款
@property (nonatomic, assign) int totalCount;

/// 切换cell类型
@property (nonatomic, copy) dispatch_block_t changeCellTypeBlock;
///点击筛选回调
@property (nonatomic, copy) void(^screeningBlock)(void);

@property (nonatomic, assign) id<LLConditionalViewDelegate> delegate;
///共有几个筛选条件
@property (nonatomic, assign) int screeningCount;

/// 是否隐藏筛选按钮
@property (nonatomic, assign) BOOL hiddenScreening;

/**
 初始化

 @param frame frame
 @param titlesArray 标题
 @param totalCount 共有多少件商品
 @return self
 */
- (instancetype)initWithFrame:(CGRect)frame titlesArray:(NSArray *)titlesArray totalCount:(int)totalCount;

/// 设置选中哪个
- (void)setSelectItemWithIndex:(NSInteger)index;

/// 设置都不选中
- (void)cancelSelected;

@end

NS_ASSUME_NONNULL_END
